﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Lottery.Control;

namespace Lottery.MediaData.UI.Control {
    public partial class SimulationInput : UserControl {
        public SimulationInput() {
            InitializeComponent();

            m_controls.Add(comboEdit1);
            m_controls.Add(comboEdit2);
            m_controls.Add(comboEdit3);
            m_controls.Add(comboEdit4);
            m_controls.Add(comboEdit5);
            m_controls.Add(comboEdit6);
            m_controls.Add(comboEdit7);
            m_controls.Add(comboEdit8);
            m_controls.Add(comboEdit9);
            m_controls.Add(comboEdit10);
            m_controls.Add(comboEdit11);
            m_controls.Add(comboEdit12);
            m_controls.Add(comboEdit13);
            m_controls.Add(comboEdit14);

            for (int i = 0; i < Count; i++) {
                var item = m_controls[i];
                item.DropDownStyle = ComboBoxStyle.DropDownList;
                item.Items.Clear();
                item.Items.AddRange(new string[] { "3", "1", "0", "310" });
                if (i != Count - 1) {
                    item.JumpToNext = m_controls[i + 1];
                }
            }
        }

        private List<ComboEdit> m_controls = new List<ComboEdit>();

        public int Count { get { return m_controls.Count; } }

        public ComboEdit this[int index] { get { return m_controls[index]; } }

        public System.Windows.Forms.Control JumpTo {
            get { return comboEdit14.JumpToNext; }
            set { comboEdit14.JumpToNext = value; }
        }
    }
}
